import request from '@/utils/request'

// 查询告警设置列表
export function listAlarmSetting(query) {
  return request({
    url: '/system/alarmconfig/list',
    method: 'get',
    params: query
  })
}

// 新增告警设置
export function addAlarmSetting(data) {
  return request({
    url: '/system/alarmconfig',
    method: 'post',
    data: data
  })
}

// 查询调度日志列表
export function listJobLog(query) {
  return request({
    url: '/monitor/jobLog/list',
    method: 'get',
    params: query
  })
}

// 删除告警设置
export function delAlarmSetting(alarmConfigIds ) {
  return request({
    url: '/system/alarmconfig/' + alarmConfigIds ,
    method: 'delete'
  })
}


// 修改告警设置
export function updateAlarmSetting(data) {
  return request({
    url: '/system/alarmconfig',
    method: 'put',
    data: data
  })
}

// 查询告警设置详情
export function getAlarmSetting(alarmConfigId) {
  return request({
    url: '/system/alarmconfig/' + alarmConfigId,
    method: 'get'
  })
}


// 删除调度日志
export function delJobLog(jobLogId) {
  return request({
    url: '/monitor/jobLog/' + jobLogId,
    method: 'delete'
  })
}

// 清空调度日志
export function cleanJobLog() {
  return request({
    url: '/monitor/jobLog/clean',
    method: 'delete'
  })
}
